import React from 'react';
import { BrowserRouter as Router, Route } from 'react-router-dom';
import EventDetail from './EventDetail';

const App = () => {
    return (
        <Router>
            <Route path="/events/:id" component={EventDetail} />
        </Router>
    );
};

export default App;
// src/App.js
import React from 'react';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import EventDetail from './EventDetail';
import RegisterPage from './RegisterPage'; // 导入报名页面组件

const App = () => {
    return (
        <Router>
            <Switch>
                <Route path="/events/:id" component={EventDetail} />
                <Route path="/register/:id" component={RegisterPage} /> {/* 添加报名页面路由 */}
            </Switch>
        </Router>
    );
};

export default App;